# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=python-osc
pkgver=1.8.3
pkgrel=1
pkgdesc='Open Sound Control server and client implementations in pure Python'
arch=(any)
url="https://github.com/attwad/python-osc"
license=(Unlicense)
depends=(python)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
checkdepends=(python-pytest)
source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
sha512sums=('cbe0092a59332492f801b73051b985fd8e6168ab70530b0994cf8b9862b98b49b5faa2d574ab8b94c0809b72321e364bd0be31c825971a7b3d95e03c2ecb17bf')
b2sums=('3b2d57707c015713c78e3c0726dfa5271b2a62ca2ea3cff6375192bdaa69915e0d91e74967a3aeed94031e1baff38fcad5dd5940bafc3c05553491b8e2df1f48')

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
 }

check() {
  cd $pkgname-$pkgver
  pytest -v
}

package() {
  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
}
